import request from "@/utils/request";

// 查询排班分类列表
export function listClassify(query) {
  return request({
    url: "/system/schedule/list",
    method: "get",
    params: query,
  });
}

// 查询排班分类详细
export function getClassify(query) {
  return request({
    url: "/system/schedule/getInfo",
    method: "get",
    params: query,
  });
}

// 新增排班分类
export function addClassify(data) {
  return request({
    url: "/system/schedule",
    method: "post",
    data: data,
  });
}

// 修改排班分类
export function updateClassify(data) {
  return request({
    url: "/system/schedule",
    method: "put",
    data: data,
  });
}

// 删除排班分类
export function delClassify(data) {
  return request({
    url: "/system/schedule/removeAll", // '/system/schedule/' + id,
    method: "delete",
    data,
  });
}

// 查询区域分类列表
export function listregionList(query) {
  return request({
    url: "/system/region/list",
    method: "get",
    params: { ...query, pageSize: 10000 },
  });
}
export function liststoreList(query) {
  return request({
    url: "/system/store/list",
    method: "get",
    params: { ...query, pageSize: 10000 },
  });
}
export function listtechnicianList(query) {
  return request({
    url: "/system/technician/normalList",
    method: "get",
    params: { ...query, pageSize: 10000 },
  });
}
export function listclassify(query) {
  return request({
    url: "/system/classify/list",
    method: "get",
    params: query,
  });
}

export function upFrameList(query) {
  return request({
    url: "/system/classify/upFrameList",
    method: "get",
    params: query,
  });
}

export function addschedule(data) {
  return request({
    url: "/system/schedule/range",
    method: "post",
    data: data,
  });
}

export function exportList(data) {
  return request({
    url: "/system/schedule/exportList",
    method: "post",
    data: data,
  });
}
